extends "../hailunna-2/hailunna-2.gd"


func _extInit():
	._extInit()
	lv = 3             #等级的设置
	addSkill("<唯一>使全体友军所受雷击伤害降低20%", "库拉湾之梦")

func _onBattleStart():
	._onBattleStart()
	for i in getAllChas(2):
		if i.hasBuff("b_hailunna") == null:
			castBuff(i, b_hailunna.new())

class b_hailunna:
	extends "../../../azurlane_ctrl/AzurBuff.gd"
	var p = 0.8
	func _init():
		attInit()
		id = "b_hailunna"
		buffName = "库拉湾之梦"
	func _connect():
		masCha.connect("onHurt",self,"onHurt")
		if casCha.upgraded == 1:
			p = 0.7
	func onHurt(atkInfo):
		if atkInfo.atkType == sys.AtkType.TORPEDO && atkInfo.atkCha != masCha:
			atkInfo.hurtVal *= p